Introduction

Hello, I am Xinyi. This is my first website. My UNI is xz3298.

My email:

My github account is XinyiZheng7

I major in Environmental Health Data Science

Also, I give a brief introduction of my academic and professional experience in the below

My academic and professional experience

I don’t know what to say first, but I need to leave some text and pictures here, so I leave a poem:

My steadfast lover, true, with no regret’s sound,

Hear my whisper soft as your eyes lead the way—

Ahead, dark thorns and mires do abound,

Yet dreams of splendor past, behind you lay.

Here are three plots

First, load necessary packages:

library(p8105.datasets)
library(flexdashboard)
library(plotly)
## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ lubridate 1.9.2     ✔ tibble    3.2.1
## ✔ purrr     1.0.2     ✔ tidyr     1.3.0
## ✔ readr     2.1.4
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks plotly::filter(), stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors

Importing and cleaning the dataset:

data(ny_noaa)

ny_noaa_subset <- ny_noaa %>%
  filter(!is.na(prcp), !is.na(snow), !is.na(tmax), !is.na(tmin),date>="2010-01-01")

Scatter Plot (Date and Snowfall)

plot_ly(ny_noaa_subset, x = ~date, y = ~prcp, type = "scatter", mode = "markers") %>%
  layout(title = "Date vs. Snowfall in 2010",
         xaxis = list(title = "Date"),
         yaxis = list(title = "Prcp"))

Barchart (Date and Precipitation)

agg_data <- aggregate(ny_noaa$prcp ~ format(ny_noaa$date, "%Y"), FUN=sum)

plot_ly(agg_data, labels = ~format(as.Date(ny_noaa$date, format="%Y-%m-%d"), "%Y"), values = ~ny_noaa$prcp, type = 'pie') %>%
  layout(title = 'Total Precipitation per Year')

Bar Chart (tmax and tmin)

plot_ly(data = ny_noaa_subset, x = ~id, y = ~snow, type = 'bar', colors = 'viridis') %>%
  layout(title = "Snow amount in 2010 per location", xaxis = list(title = "location"), yaxis = list(title = "Snow amount"))